home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / DevPac v3.02b.adf / include / exec / memory.i < prev    next >
Text File  |  1991-11-20  |  2KB  |  94 lines

  1.     IFND    EXEC_MEMORY_I
  2. EXEC_MEMORY_I    SET    1
  3. **
  4. **    $Filename: exec/memory.i $
  5. **    $Release: 1.3 $
  6. **
  7. **    definitions for use with the memory allocator
  8. **
  9. **    (C) Copyright 1985,1986,1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.     IFND    EXEC_NODES_I
  14.     INCLUDE    "exec/nodes.i"
  15.     ENDC    ; EXEC_NODES_I
  16.  
  17.     IFND    EXEC_LISTS_I
  18.     INCLUDE    "exec/lists.i"
  19.     ENDC    ; EXEC_LISTS_I
  20.  
  21.  
  22. *---------------------------------------------------------------------
  23. *
  24. *   Memory List Structures
  25. *
  26. *---------------------------------------------------------------------
  27. *
  28. *   A memory list appears in two forms:     One is a requirements list*
  29. *   the other is a list of already allocated memory.  The format is
  30. *   the same, with the reqirements/address field occupying the same
  31. *   position.
  32. *
  33. *   The format is a linked list of ML structures each of which has
  34. *   an array of ME entries.
  35. *
  36. *---------------------------------------------------------------------
  37.  
  38.  STRUCTURE ML,LN_SIZE
  39.     UWORD   ML_NUMENTRIES        * The number of ME structures that follow
  40.     LABEL   ML_ME            * where the ME structures begin
  41.     LABEL   ML_SIZE
  42.  
  43.  
  44.  STRUCTURE ME,0
  45.     LABEL   ME_REQS            * the AllocMem requirements
  46.     APTR    ME_ADDR            * the address of this block (an alias
  47. *                    *    for the same location as ME_REQS)
  48.     ULONG   ME_LENGTH            * the length of this region
  49.     LABEL   ME_SIZE
  50.  
  51.  
  52. *------ memory options:
  53.  
  54.     BITDEF  MEM,PUBLIC,0
  55.     BITDEF  MEM,CHIP,1
  56.     BITDEF  MEM,FAST,2
  57.     BITDEF  MEM,CLEAR,16
  58.     BITDEF  MEM,LARGEST,17
  59.  
  60.  
  61. *------ alignment rules for a memory block:
  62.  
  63. MEM_BLOCKSIZE    EQU 8
  64. MEM_BLOCKMASK    EQU (MEM_BLOCKSIZE-1)
  65.  
  66.  
  67. *---------------------------------------------------------------------
  68. *
  69. *   Memory Region Header
  70. *
  71. *---------------------------------------------------------------------
  72.  
  73.  STRUCTURE  MH,LN_SIZE
  74.     UWORD   MH_ATTRIBUTES        * characteristics of this region
  75.     APTR    MH_FIRST            * first free region
  76.     APTR    MH_LOWER            * lower memory bound
  77.     APTR    MH_UPPER            * upper memory bound+1
  78.     ULONG   MH_FREE            * number of free bytes
  79.     LABEL   MH_SIZE
  80.  
  81.  
  82. *---------------------------------------------------------------------
  83. *
  84. *   Memory Chunk
  85. *
  86. *---------------------------------------------------------------------
  87.  
  88.  STRUCTURE  MC,0
  89.     APTR    MC_NEXT            * ptr to next chunk
  90.     ULONG   MC_BYTES            * chunk byte size
  91.     LABEL   MC_SIZE
  92.  
  93.     ENDC    ; EXEC_MEMORY_I
  94.